The present invention disclosure generally relates to an encoding method for image compression, and particularly, to a method which can be configured for improving the efficiency of the encoding method corresponding to the next-generation international standard “JPEG-2000”, which is a compression method for still images.
In recent years, various techniques have been developed in an attempt to improve the efficiency of the image storage process in the field of image recording, concerning such devices as the digital still camera, the recording component of the digital copier, the surveillance camera, the digital video storage, the digital camera (for recording moving images), etc. In particular, JPEG-2000 is being widely acknowledged as the next-generation technology succeeding JPEG (Joint Photographic Experts Group), which is the current mainstream technology in this field.
FIG. 1 shows a flow chart of an encoding process according to the JPEG-2000 standard. FIGS. 2 and 3 show exemplary outlines of the process performed in the individual steps of FIG. 1.
In the first step of FIG. 1, a multi-leveled two dimensional discrete wavelet transformation (DWT) is performed on the input image data (101).
Upon performing the encoding process, the data image to be processed can be divided into a plurality of rectangular blocks called tiles, as shown in FIG. 2. If the data image is divided into a plurality of tiles, each of the ensuing processes; namely, the two dimensional discrete wavelet transformation (DWT) process, the quantization process, and the entropy encoding process will be performed on each of the individual tile units.
FIG. 2 illustrates the DWT process in a case where the image data are divided into tiles each having dimensions of 128×128 pixels, and where the two dimensional discrete wavelet transformation at level 2 is performed on the image data of each of the tiles divided accordingly.
By means of the two dimensional discrete wavelet transformation at level 2, the image data of the 128×128 pixels tiles are transformed into wavelet coefficient data from the four sub bands 2LL, 2HL, 2LH and 2HH each having dimensions of 32×32 pixels, and the three sub bands 1HL, 1LH and 1HH each having dimensions of 64×64 pixels.
In the JPEG-2000 standard, two coefficients, lossless and lossy, are standardized as the filter coefficients of the wavelet transformation. More specifically, the lossless coefficient is used when handling the lossless and lossy coefficients together, and the lossy coefficient is used when a higher compression rate or distortion characteristic is to be realized.
The next process is to perform a scalar quantization to the obtained wavelet coefficient data based on the following equation (102):q=sign(a)×└|a|/Δb┘Referring to the above equation, sign(a) represents a code for the wavelet coefficient data (a); |a| represents the absolute value of (a); Δb represents the quantization step determined for each sub band; and └ ┘ represents a floor function. However, this scalar quantization is not performed when the lossless wavelet coefficient is used.
Following the above-described wavelet transformation, or the quantization process, an entropy encoding process is performed on the coefficient data obtained therefrom, on each of the sub bands, or on each of the code blocks, which are rectangular areas that further subdivide the sub band.
As shown in FIG. 1, this entropy encoding process comprises a step of coefficient modeling for generating context to be provided to the later-described two-value arithmetic encoder (104) from the above coefficient data, and a step of actually performing the encoding process by means of the arithmetic encoder (104).
The specific procedures of this process are described below.
{circle around (1)} Transform the coefficient data of a sub band or code block into (code)+(absolute value).
In this case, the absolute value of the coefficient is divided into bit planes for each bit of the coefficient, and the entropy encoding process is performed for each bit plane starting with the bit plane on the MSB side.
FIG. 3 illustrates, as an example, how the absolute value of the coefficient of the sub band 2LL is divided into bit planes (zero bit planes, bit plane N, bit plane N−1, . . . , bit plane 1, bit plane 0) for each bit corresponding to each pixel.
{circle around (2)} Furthermore, among the above bit planes, the planes from the top just until the plane representing a valid bit (a bit other than 0) are called the zero bit planes and the entropy encoding process is not performed on these planes. The entropy encoding process starts at the first bit plane that indicates a bit other than 0 (bit plane N, in the case of FIG. 3).
In the example of FIG. 3, the top two bit planes are zero bit planes, and a bit other than 0 appears for the first time at the third bit plane. The entropy encoding process starts from the above bit plane N and is performed for N+1 bit planes until reaching bit plane 0.
{circle around (3)} For the bit planes that forgo the entropy encoding process, each bit plane is normally scanned 3 times in order to be encoded. The scanning process for encoding the bit plane is called a coding pass and each pass is referred to as follows:
1) significance propagation pass
2) magnitude refinement pass
3) cleanup pass
Each bit on the bit plane is classified according to a certain rule, and the bit plane is encoded in one of the above passes using the context generated from the states of the bits surrounding the respective bit.
Specifically, as shown in FIG. 3, the bit plane N, which is the first plane to be encoded, is processed only in the cleanup pass. The ensuing bit planes are each encoded using the above 3 coding passes. Thus, for N+1 bit planes, the encoding process is performed by a total of 3N+1 passes.
{circle around (4)} Next, an entropy code is generated in the arithmetic encoder (104) using the encoded bits generated from each of the above passes and their corresponding context.
The entropy codes (MQ code) generated in this way are put together in the final code formation step (105) shown in FIG. 1 to produce a JPEG-200 bit stream.
In the code formation process (105), the codes generated from each pass in the arithmetic encoder (104) are put together for every set of passes, such sets being referred to as layers.
FIG. 4 illustrates a process in which the codes generated in the arithmetic encoder for 3N+1 passes are put together into L+1 layers from layer 1 to layer L. In this drawing, bit data and its corresponding context data necessary for the encoding process are selected and input to the arithmetic encoder by the multiplexer based on the above coefficient data, and the codes for each bit plane and each coding pass are generated by the arithmetic encoder after which each of the codes obtained thusly are put together into layers.
Further, as shown in FIG. 5, the codes assembled together for each sub band and each layer are arranged to produce a final bit stream. Here, the set of each sub band and each layer is called a packet, and each packet comprises a packet header for indicating the respective packet information, and the above-described entropy codes produced at the arithmetic encoder.
The above is a description of an encoding process for input image data that is monochrome. For encoding an image with multi-colors (components) such as an RGB image, the packets of each sub band and each layer are produced for each color (component) in a similar fashion, and the JPEG-2000 bit stream is obtained by arranging these packets in the established order (FIG. 6).
FIG. 6 illustrates an example of the encoding process in which an image with 3 colors (component 0, 1, and 2) is encoded into a JPEG-2000 bit stream.
The encoding process in accordance with the JPEG-2000 standard is characterized in that once the bit stream is encoded, it can be recompressed to obtain the necessary compression rate in its encoded state without having to decode said bit stream.
This is due to the fact that the code for the JPEG-2000 standard comprises a set of codes for each component (color component), each sub band (resolution), and each layer. Thus, for example, in a case where an encoding process is performed only to find out later on that the compression rate of the encoded image does not satisfy the desired compression rate, the encoded data are discarded in due order starting with the packet that has the lowest priority. As a result, an operation of raising the compression rate can be performed with relatively little degradation of the image quality.
The code shown in FIG. 6 is lossless code. Code that is further compressed from the code of FIG. 6 (with a raised compression rate) can be obtained (recompression), as shown in FIG. 7, by discarding the packets of the layers L with the sub bands 1HL, 1LH and 1HH, for each of the different components in FIG. 6, this being a lossy code.
However, in the above-described recompression, the codes of the predetermined packets can be discarded only when the encoding process is completed for an entire picture (for example, one image) after which the breaks in the codes of each of the packets are determined. Therefore, some time will be required for the determination process and the like, and this can be a problem in an encoding process requiring high speed such as in encoding a moving image.